<?php

/**
 * This is the model class for table "lelangbarangjaminansingaparna".
 *
 * The followings are the available columns in table 'lelangbarangjaminansingaparna':
 * @property integer $lbjs_id
 * @property integer $lbjs_bulan
 * @property integer $lbjs_lelangbrgpinjamn
 * @property integer $lbjs_lelanguangpinjaman
 * @property integer $lbjs_sisabarangjaminan
 * @property integer $lbjs_sisauangpinjaman
 * @property integer $lbjs_tahun
 */
class Lelangbarangjaminansingaparna extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Lelangbarangjaminansingaparna the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'lelangbarangjaminansingaparna';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('lbjs_bulan, lbjs_lelangbrgpinjamn, lbjs_lelanguangpinjaman, lbjs_sisabarangjaminan, lbjs_sisauangpinjaman, lbjs_tahun', 'numerical', 'integerOnly'=>true),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('lbjs_id, lbjs_bulan, lbjs_lelangbrgpinjamn, lbjs_lelanguangpinjaman, lbjs_sisabarangjaminan, lbjs_sisauangpinjaman, lbjs_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'lbjs_id' => 'Lbjs',
			'lbjs_bulan' => 'Bulan',
			'lbjs_lelangbrgpinjamn' => 'Lelang Barang Pinjaman',
			'lbjs_lelanguangpinjaman' => 'Lelang Uang Pinjaman',
			'lbjs_sisabarangjaminan' => 'Sisa Barang Jaminan Belum Dilunasi',
			'lbjs_sisauangpinjaman' => 'Sisa Uang Pinjaman Belum Dilunasi',
			'lbjs_tahun' => 'Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('lbjs_id',$this->lbjs_id);
		$criteria->compare('lbjs_bulan',$this->lbjs_bulan);
		$criteria->compare('lbjs_lelangbrgpinjamn',$this->lbjs_lelangbrgpinjamn);
		$criteria->compare('lbjs_lelanguangpinjaman',$this->lbjs_lelanguangpinjaman);
		$criteria->compare('lbjs_sisabarangjaminan',$this->lbjs_sisabarangjaminan);
		$criteria->compare('lbjs_sisauangpinjaman',$this->lbjs_sisauangpinjaman);
		$criteria->compare('lbjs_tahun',$this->lbjs_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}